package cn.bluedot.controller;

import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.bluedot.model.VaccinationRecordView;
import cn.bluedot.service.VaccinationRecordService;

/**
 * 疫苗记录管理controller
 * 
 * @author hxp 2019年4月18日 下午7:32:23
 */
@Controller
public class VaccinationRecordController {
    @Autowired
    private  VaccinationRecordService vaccinationRecordService;
    /**
     * 显示疫苗接种记录
     * @return  疫苗记录视图类
     */
    @RequestMapping("/showrecord")
    public Set<VaccinationRecordView> showRecord() {
        Set<VaccinationRecordView> view = vaccinationRecordService.showRecord();
        System.out.println(view.toString());
            return view;       
    }
    
    public void updateVaccinationOneRecord(String recordId,String state) {
        //所有疫苗接种设置的均为未接种需要修改为已接种
        vaccinationRecordService.updateVaccinationOneRecord(recordId,state);
    }
}
